package exception;

import java.io.FileNotFoundException;

public class throwsDemo {

    public static void main(String[] args) {
        Student zs=new Student();
        try {
            zs.setAge(250);
        } catch ( IllegalAgeException e) {
           // e.printStackTrace();
            System.out.println(e.getMessage());
        }
        System.out.println(zs.getAge());

    }
}
